package com.changgou.common.model.response.goods;


import com.changgou.common.model.response.ResultCode;
import lombok.ToString;

@ToString
public enum SpuCode implements ResultCode {

    GOODS_SPU_ERROR(false,27001,"当前商品不存在"),
    GOODS_SPU_BRAND_ERROR(false,27003,"当前商品不存在"),
    GOODS_SPU_BRAND_DELETE_ERROR(false,27004,"当前商品处于删除状态"),
    GOODS_SPU_NOT_DATA_ERROR(false,27005,"当前没有数据被查询到,无法导入索引库"),
    GOODS_SPU_DELETE_ERROR(false,27002,"当前商品处于删除状态");

    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;
    private SpuCode(boolean success, int code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() { return success; }
    @Override
    public int code() {
        return code;
    }
    @Override
    public String message() {
        return message;
    }


}
